<?php
    // 查询 deliver 表
    function get_deliver_data(){
        $result = mysql_query("SELECT * FROM cv");
  
        $results = array();
        while ($row = mysql_fetch_assoc($result)) {
            $results[] = $row;
        }
    
        $arrData = createJsonData($results);
        
        echo json_encode($arrData);
    }

    // 添加 deliver 数据
    function insert_deliver_data(){
        $deliverid = time() * 3;
        mysql_query("insert into deliver 
        (deliverid , openid , recruitid , deliver_time)  
        values 
        ('$deliverid' , '$_POST[openid]' , '$_POST[recruitid]' , 
        '$_POST[deliver_time]')");
        
    }

    // 删除 chanpin 数据
    function delete_deliver_data(){
        mysql_query("delete from deliver where Id='$_GET[Id]'");
    }

    // 根据 招聘信息 id 查看投递记录
    function get_deliver_by_recruit(){
        $result = mysql_query("select * from deliver where recruitid='$_POST[recruitid]'");
        
        $results = array();
        while ($row = mysql_fetch_assoc($result)) {
            $results[] = $row;
        }
    
        echo json_encode($results);
    }



?>